package game.source.price;

import java.awt.Point;

import game.source.gui.price.CallBackPriceInterface;
import game.source.manager.ShowInterface;
import game.source.physics.PhysicsObjectInterface;
import game.source.ships.PlayerShip;
/**
 *Price:
 *	Realiza a ação do prêmio no player
 */
public abstract class Price implements CallBackPriceInterface,PhysicsObjectInterface,ShowInterface{
	private	PlayerShip			player;	//Player que recebe o prêmio
	private GuiPriceInterface	gui;
	
	public Price(GuiPriceInterface gui,Point start,PlayerShip player){
		this.gui = gui;
		this.player = player;
		this.gui.setStartPosition(start);
		this.gui.setPrice(this);
	}
	
	protected PlayerShip getPlayer(){
		return this.player;
	}
	
	@Override
	public void show(long time) {
		this.gui.show(time);	
	}
	@Override
	public int getX0() {
		return this.gui.getX0();
	}
	@Override
	public int getY0() {
		return this.gui.getY0();
	}
	@Override
	public int getWidth() {
		return this.gui.getWidth();
	}
	@Override
	public int getHeight() {
		return this.gui.getHeight();
	}
	@Override
	public byte getPixelAlpha(int x, int y) {
		return this.gui.getPixelAlpha(x, y);
	}
}
